import request from '@/utils/request'

//注册
export const userRegisterService = (username, password) =>
  request.post('/api/reguser', { username, password })

//登录
export const userLoginService = (username, password) => {
  return request.post('/api/login', { username, password })
}
//获取管理员基本信息
export const userGetInfoService = (username) => {
  return request.get(`/api/userMessage/${username}`)
}

export const userUpdateInfoService = (data) => {
  return request.post('/api/userUpdateInfo', data)
}

export const userUpdateavatarService = (data) => {
  return request.post('/api/userUpdateavatar', data)
}
export const userUpdatepasswordService = (data) => {
  return request.post('/api/userUpdatepassword', data)
}
